<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;

//用户图片管理
//收藏图片
Route::post('house', 'index/house/house');

//用户关注
Route::post('attention','index/attention/index');

//vip
Route::get('vip', 'index/vip/index');
Route::post('pay', 'index/vip/pay');


//图片上传模块
Route::get('/', 'index/index/index');
Route::get('newpic', 'index/details/newpic');
Route::get('err', 'index/error/index');
Route::resource('upload', 'index/upload');
Route::get('up', 'index/upload/up');
Route::get('download', 'index/download/index');
Route::post('doedit', 'index/upload/doedit');
// 图片下载
Route::get('dodown', 'index/download/dodown');
Route::get('passed', 'index/upload/passed');
Route::get('editing', 'index/upload/editing');
Route::get('waiting', 'index/upload/waiting');
Route::get('test', 'index/index/test');
Route::get('home', 'index/details/home');




//后台模块
Route::resource('user', 'admin/user');
Route::resource('role', 'admin/role');
Route::resource('privilege', 'admin/privilege');
Route::get('admin', 'admin/index/index');
Route::get('action', 'admin/role/action');
Route::post('addrole', 'admin/privilege/addrole');
Route::get('update', 'admin/role/up');
Route::get('error', 'error/index/index');
Route::get('goods', 'admin/goods/index');
Route::get('uncheck', 'admin/goods/uncheck');
Route::post('check', 'admin/goods/check');
Route::delete('delimg', 'admin/goods/delete');
Route::get('banner', 'admin/goods/banner');
Route::post('save', 'admin/goods/save');
Route::post('dela', 'admin/goods/dela');

//推送banner
Route::post('push', 'admin/goods/push');
//删除banner
Route::delete('delbanner', 'admin/goods/delbanner');
//更换banner url地址
Route::post('changeurl', 'admin/goods/changeurl');
//后台图片分类
Route::get('category', 'admin/category/index');
Route::get('checkcate', 'admin/category/check');
    // 添加一级分类
    Route::get('addcate', 'admin/category/addcate');
    Route::post('doaddcate', 'admin/category/doaddcate');
    Route::get('checkcatename', 'admin/category/checkcatename');
    Route::post('category', 'admin/category/doedit');
    Route::resource('cate', 'admin/category');
//后台推送首页图片
Route::post('row', 'admin/goods/row');
    //图片分类页面
    Route::get('cate1', 'index/index/cate1');
    //搜索分类
    Route::get('search', 'index/index/search');

     // 后台友情链接
    Route::get('link', 'admin/link/index');
    Route::get('link_action', 'admin/link/action');
    Route::get('link_update', 'admin/link/link_update');
    Route::post('do_link', 'admin/link/do_link');
    Route::resource('link', 'admin/link');
    // 广告啊
    Route::post('doup', 'admin/advertisement/doup');
    Route::get('adv_up', 'admin/advertisement/adv_up');
    Route::resource('advertisement', 'admin/advertisement');
    Route::get('adv_check', 'admin/advertisement/adv_action');
    

// 后台权限添加用户
    Route::get('add', 'admin/user/add');
    Route::post('doadd', 'admin/user/doadd');
    Route::get('checkname', 'admin/user/check');
    Route::resource('u', 'admin/user');

    //个人中心实名认证
    Route::get('idcard', 'index/personal/idcard');
    Route::post('upidcard', 'index/personal/upidcard');
    
//PQ模块
//注册首页
Route::get('registe', 'index/registe/index');
//首页招聘
Route::get('join', 'index/index/join');
//处理注册
Route::post('doregiste', 'index/registe/doregiste');
//处理qq绑定
Route::post('doqq','index/registe/doqq');
//发送短信
Route::post('domsg', 'index/registe/domsg');
//登录首页
Route::get('login', 'index/login/index');
//账号密码登录
Route::post('dologin', 'index/login/dologin');
//处理短信验证码登录
Route::post('msglogin', 'index/login/msglogin');
//处理邮箱登录
Route::post('doemaillogin','index/login/doemaillogin');
//qq登录
Route::get('qqlogin', 'index/login/qqlogin');
//qq回调
Route::get('qqcallback', 'index/login/qqcallback');
//发送短信验证码登录
Route::post('sendmsg', 'index/login/domsg');
//图片验证码
Route::get('imgcode', 'index/login/imgcode');
//ajax验证手机号码
Route::post('isphone', 'index/login/isphone');
//重置密码首页
Route::get('restpass', 'index/restpass/index');
//处理重置
Route::post('dorest', 'index/restpass/dorest');
//退出登录
Route::get('outlogin', 'index/login/outlogin');
//个人中心
Route::get('personal', 'index/personal/index');
//个人资料页面
Route::get('personalEdit', 'index/personal/edit');
//处理编辑
Route::post('doEdit', 'index/personal/doEdit');
//处理编辑邮箱
Route::post('doEmail', 'index/personal/doEmail');
//发送邮箱验证码
Route::post('emailCode', 'index/personal/emailCode');
//处理编辑手机
Route::post('doPhone', 'index/personal/doPhone');
//后台登录
Route::get('adminLogin', 'admin/login/index');
// 后台退出登录
Route::get('logout', 'admin/login/logout');
//处理登录
Route::post('adminDoLogin', 'admin/login/dologin');
//后台会员管理
Route::resource('adminmember', 'admin/member');
//后台会员激活禁用操作
Route::get('adminDoaction', 'admin/member/action');
//会员关注列表
Route::get('indexAttention','index/details/attention');
//会员粉丝列表
Route::get('indexfans','index/details/fans');
//推荐好友列表
Route::get('indexfriends','index/details/friends');
//推荐好友列表执行关注
Route::get('doattention','index/attention/attention');
//个人中心收藏列表
Route::get('collect','index/details/collect');
//个人中心取消关注
Route::get('unfollow','index/attention/unfollow');
//取消收藏
Route::get('indexcancel','index/details/cancel');
//收藏和取消收藏ajax
Route::get('docollect','index/details/docollect');
//邮箱注册
Route::post('indexemail','index/registe/email');
Route::get('indexdoemail','index/registe/doemail');

Route::miss('index/error/index');


//手机端路由
Route::get('mindex','mobile/index/index');
//分类页面
    Route::get('mgoods','mobile/index/goods');
    // 分类
    Route::get('mcate','mobile/category/index');
    // 设计资讯
    Route::get('mdesign','mobile/design/index');
    //详情页
    Route::get('mdetails','mobile/details/index');
    //登录界面
    Route::get('mlogin','mobile/login/index');
    //处理登录
    Route::post('mdologin','mobile/login/dologin');
    //手机端退出登录
    Route::get('moutlogin','mobile/login/outlogin');
    // 咨询详情
    Route::get('mdetail','mobile/design/detail');
    //手机搜索
    Route::post('msearch','mobile/index/search');


return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]' => [
        ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];


